{load header}
<!--/H-->

    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
        <!-- nav --><!-- nav -->
	<div class="main-title">
		<h2>视频管理</h2>
	</div>
	<div class="tab-wrap">
		<ul class="tab-nav nav">
			<li><a href="{eval echo site_url('contents/videos')}">视频列表</a></li>
			<li class="current"><a href="{eval echo site_url('contents/videos_edit')}?id={$item['id']}">修改视频</a></li>
		</ul>
		
		<div class="tab-content">

			<form action="" method="post" class="form-horizontal">
				<div class="form-item">
					<label class="item-label">视频标题<span class="check-tips">（用于前台显示的页面名称）</span></label>
					<div class="controls">
						<input type="text" class="text input-large" name="title" value="{$item['title']}">
					</div>
				</div>
<!--				<div class="form-item">
					<label class="item-label">发表人<span class="check-tips"></span></label>
					<div class="controls">
						<input type="text" class="text input-large" name="author" value="{$item['author']}">
					</div>
				</div>-->
				<div class="form-item">
					<label class="item-label">缩略图<span class="check-tips">（用于前台显示）</span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id">
						<input type="hidden" name="img_url" id="cover_id_cover_id" value="{$item['img_url']}"/>
						<div class="upload-img-box"><!--{if ($item['img_url']!='')}--><div class="upload-pre-item"><img src="{$item['img_url']}"/></div><!--{/if}--></div>
					</div>
					<script type="text/javascript" src="{eval echo base_url()}static/uploadify/jquery.uploadify.min.js"></script>
					<script type="text/javascript">
						//上传图片
						/* 初始化上传插件 */
						$("#upload_picture_cover_id").uploadify({
							"height"          : 30,
							"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
							"fileObjName"     : "picture",
							"buttonText"      : "上传图片",
							"uploader"        : "http://static.tan66.com/upload/adsimg.html",
							//'formData' : {"action": "upload", "sid" : ""},
							"width"           : 120,
							'removeTimeout'	  : 1,
							'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
							"onUploadSuccess" : uploadPicturecover_id,
							'onFallback' : function() {
								alert('未检测到兼容版本的Flash.');
							}
						});
						function uploadPicturecover_id(file, data){
							var data = $.parseJSON(data);
							var src = '';
							if(data.status){
								$("#cover_id_cover_id").val(data.id);
								src = data.url || '' + data.path
								$("#cover_id_cover_id").parent().find('.upload-img-box').html(
										'<div class="upload-pre-item"><img src="' + src + '"/></div>'
								);
							} else {
								updateAlert(data.info);
								setTimeout(function(){
									$('#top-alert').find('button').click();
									//$(that).removeClass('disabled').prop('disabled',false);
								},1500);
							}
						}
					</script>
				</div>
				<!--
           <div class="form-item">
               <label class="item-label">简要介绍<span class="check-tips">（内容请不要超过200字）</span></label>
               <div class="controls">
                   <label class="textarea">
                       <textarea name="summary" style="height:50px;"></textarea>
                   </label>
               </div>
           </div>
                -->
				<div class="form-item">
					<label class="item-label">视频链接<span class="check-tips">（外部链接）</span></label>
					<div class="controls">
						<input type="text" class="text input-large" name="link_url" value="{$item['link_url']}">
					</div>
				</div>
				<div class="form-item">
					<label class="item-label">视频描述<span class="check-tips">（视频详细内容）</span></label>
					<div class="controls">
						<label class="textarea">
							<textarea name="desc">{$item['desc']}</textarea>
						</label>
					</div>
				</div>
				<div class="form-item">
					<label class="item-label">是否启用<span class="check-tips"></span></label>
					<div class="controls">
						<label class="radio"><input <!--{if ($item['status'])=='1' }-->checked<!--{/if}--> type="radio" name="status" value="1">是</label>
						<label class="radio"><input <!--{if ($item['status'])=='0' }-->checked<!--{/if}--> type="radio" name="status" value="0">否</label>
					</div>
				</div>



				<div class="form-item">
					<input type="hidden" name="id" value="{$item['id']}">
					<button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
					<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</form>
	
		</div>
	</div>

<!--F-->{load footer}